
import React from 'react'
import { inject,observer } from "mobx-react";
import { Table,Space } from "antd";
import {NavLink} from 'react-router-dom'
import { Switch } from 'antd';

function onChange(checked) {
  console.log(`switch to ${checked}`);
}

@inject('xingYunChouJiang')
@observer
class LockDraw extends React.Component{



    render(){
        let tz = ()=>{
            this.props.history.push("/Home/cuXiao/Draw/LockDraw")
        }
        console.log(this.props.xingYunChouJiang)
        let {tabDataAll} = this.props.xingYunChouJiang
        let pagination = {
            defaultPageSize:4,
        }
        const columns = [
            {
              title: '姓名',
              dataIndex: 'youhuijuan',
              key: 'youhuijuan',
            },
            {
              title: '年龄',
              dataIndex: 'type',
              key: 'type',
            },
            {
              title: '住址',
              dataIndex: 'money',
              key: 'money',
            },
            {
                title: 'moneyXiaXian',
                dataIndex: 'moneyXiaXian',
                key: 'moneyXiaXian',
              },
              {
                title: 'moneyXiaXian',
                key: 'moneyXiaXian',
                render: (text, record) => (
                  <Space size="middle">
                    {/* {console.log(text)} */}
                    <Switch  defaultChecked onChange={onChange} />
                  </Space>
                ),
              },
              {
                title: 'Action',
                key: 'action',
                render: (text, record) => (
                  <Space size="middle">
                    <button onClick={tz}>查看</button>
                    <a>修改</a>
                    <a>删除</a>
                  </Space>
                ),
              },
          ];
          
        return(
            <div>
                <h1>中奖用户</h1>
                <div>
                  <Table pagination={pagination} dataSource={tabDataAll} columns={columns} />
                </div>
                
            </div>
        )
    }
}

export default LockDraw